package pumps

import (
	"context"

	"gitee.com/youkelike/zlog"
)

type DummyPump struct {
	CommonPumpConfig
}

// New create a dummy pump instance.
func (p *DummyPump) New() Pump {
	return &DummyPump{}
}

// GetName returns the dummy pump name.
func (p *DummyPump) GetName() string {
	return "Dummy Pump"
}

// Init initialize the dummy pump instance.
func (p *DummyPump) Init(conf interface{}) error {
	zlog.Debugw("Dummy Initialized")

	return nil
}

// WriteData write analyzed data to dummy persistent back-end storage.
func (p *DummyPump) WriteData(ctx context.Context, data []interface{}) error {
	zlog.Infow("Writing %d records", len(data))

	return nil
}
